<!-- This is a regression test for crbug.com/537711, in which printing
     was causing a crash on the main thread of the render process -->
<head>
<script src="../resources/js-test.js"></script>
</head>
<body>
<div id="console"></div>
<script>
var can = document.createElement('canvas');
can.width = can.height = 17000;
document.body.appendChild(can);
var ctx = can.getContext("webgl");
ctx.clearColor(0, 0, 0, 1);
ctx.clear(ctx.COLOR_BUFFER_BIT);

if (!window.testRunner) {
    testFailed("Requires window.testRunner");
} else {
    testRunner.waitUntilDone();
    testRunner.capturePrintingPixelsThen(() => {
      testPassed("Printed without crashing.");
      testRunner.notifyDone();
    });
}
</script>
</body>
